// 保存用户信息
export const setUserInfo = (obj) => {
  sessionStorage.setItem("userInfo", JSON.stringify(obj))
}
// 获取用户信息
export const getUserInfo = () => {
  return JSON.parse(sessionStorage.getItem("userInfo")) || {}
}
// 设置token
export const setToken = (jwt) => {
  sessionStorage.setItem("token", jwt)
}
// 获取token
export const getToken = () => {
  return sessionStorage.getItem("token")
}
// 登出清除所有信息
export const removeAll = () => {
  sessionStorage.clear()
}

// 设置主题颜色
export const setThemeColor = (color) => {
  sessionStorage.setItem("themeColor", color)
}
// 获取主题颜色
export const getThemeColor = () => {
  return sessionStorage.getItem("themeColor")
}
